#include<stdio.h>
int main()
{
	int n,sum=1;
	scanf("%d",&n);
	int p=1,k=1;
	while(1){
		if(k<n){
			p*=3;
			k+=p;
			sum++;
		}
		else
			break;
	}
	printf("%d",sum);
	return 0;
}
